<template>
  <FindYou :list="personList" /> <!-- 要是不加 : 的话 就直接是字符串 -->
</template>

<script lang="ts" setup name = 'App'> /* 写TS  */
import FindYou from './components/Person.vue' // 在导入时使用了 myPerson 这个变量名
import {ref, reactive} from 'vue'
import { type Persons } from '@/types'

//------------------数据-----------------------
let personList = reactive <Persons>([ // reactive也可以传泛型
  {id: '1', name: '贾', age: 1},
  {id: '2', name: '贾', age: 2},
  { id: '3', name: '贾', age: 3},
  { id: '4', name: '贾', age: 4, x: 12},
])


</script>




<style>
.app {
  background-color: skyblue;
}
</style>
